package com.future.mapper;

import com.future.pojo.Users;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Optional;

@Mapper

public interface UserMapper {
    int insertUser(@RequestParam("userName")String userName, @RequestParam("userHao")String userHao, @RequestParam("userPwd")String userPwd, @RequestParam("userEmail")String userEmail);
    Users userHaoLogin(@RequestParam("userHao")String userHao);
    int checkUserHao(@RequestParam("userHao")String userHao,@RequestParam("userLv")String userLv);
    Users checkHao(@RequestParam("userHao")String userHao);
    int changePwd(@RequestParam("userHao")String userHao,@RequestParam("userPwd")String userPwd);
    Users userEmailLogin(@RequestParam("userEmail")String userEmail);
    Users giteeLogin(@RequestParam("Id")String Id);
    int checkEmail(@RequestParam("userEmail")String userEmail);
    int bindCount(@RequestParam("userHao")String userHao,@RequestParam("Id")String Id);

    //根据id查找用户个人信息
    List<Users> queryByIdUser(@RequestParam("userId") int userId);


    //用户更新用户信息
    int updateuserUser(@RequestParam("userId")int userId, @RequestParam("userName")String userName, @RequestParam("userEmail")String userEmail,@RequestParam("userBirth") String userBirth,@RequestParam("userGen")char userGen);



    //注销账号
    int deleteMe(@RequestParam("userId") int userId);

    //查询密码
    String queryMyPwd(@RequestParam("userId") int userId);

    //申请成为歌手
    int changeSinger(@RequestParam("userId") int userId);


    //检查是否添加我喜欢
    int checkLike(@RequestParam("mcName")String mcName,@RequestParam("userId")int userId);

}

